package com.rati.usercenter.common;

/**
 * 错误码枚举类
 */
public enum ErrorCode {

    SUCCESS(0, "ok", ""),

    PARAMS_ERROR(40000, "请求参数错误", ""),
    NULL_ERROR(40001, "请求的数据为空", ""),

    NO_LOGIN(40100, "未登录", ""),
    NO_AUTH(40101, "无权限", ""),
    ABNORMAL_STATUS(40102, "用户状态异常", ""),

    SYSTEM_ERROR(50000, "服务器异常", ""),
    SERVER_ERROR(50001, "后台处理异常", "");


    /**
     * 状态码
     */
    private final int code;
    /**
     * 状态码描述
     */
    private final String msg;
    /**
     * 详细信息
     */
    private final String description;

    ErrorCode(int code, String msg, String description) {
        this.code = code;
        this.msg = msg;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public String getDescription() {
        return description;
    }
}
